package com.ruoyi.points.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 积分流水记录对象 community_points_log
 * 
 * @author xianyu
 * @date 2025-04-03
 */
public class CommunityPointsLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /** 关联用户 */
    @Excel(name = "关联用户")
    private Long userId;

    /** 变动积分（正为获得，负为消耗） */
    @Excel(name = "变动积分", readConverterExp = "正=为获得，负为消耗")
    private Long points;

    /** 来源（suggestion/exchange...) */
    @Excel(name = "来源", readConverterExp = "来源（suggestion/exchange...)")
    private String sourceType;

    /** 关联来源ID */
    @Excel(name = "关联来源ID")
    private Long sourceId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setPoints(Long points) 
    {
        this.points = points;
    }

    public Long getPoints() 
    {
        return points;
    }

    public void setSourceType(String sourceType) 
    {
        this.sourceType = sourceType;
    }

    public String getSourceType() 
    {
        return sourceType;
    }

    public void setSourceId(Long sourceId) 
    {
        this.sourceId = sourceId;
    }

    public Long getSourceId() 
    {
        return sourceId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("points", getPoints())
            .append("sourceType", getSourceType())
            .append("sourceId", getSourceId())
            .append("createTime", getCreateTime())
                .append("userName", getUserName())
            .toString();
    }
}
